package com.joker.yuwu;

import com.joker.repository.UserDelZg;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

@WebServlet("/deluserzg")
public class DelUseZg extends HttpServlet {
    @Override
    protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
//        super.doGet(req, resp);
        req.setCharacterEncoding("utf-8");
        resp.setContentType("text/json; charset=utf-8");
        String user=req.getParameter("username");
//        获取用户名
        String zgname=req.getParameter("zgname");
//        获取展馆名
        System.out.println("用户名为"+user);
        System.out.println("展馆名是"+zgname);
        UserDelZg u1=new UserDelZg();
        int i= u1.show(zgname,user);
        resp.sendRedirect("/member/design.jsp");

    }

    @Override
    protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
//        super.doPost(req, resp);
    }
}
